$(document).ready(function () {  

$('#submit').click(function () {
	var email = $('[name=email]').val();
	var password = $('[name=password]').val();
	var password1 = $('[name=password1]').val();
	if(password != "" && password1 != "" && password == password1){
        var hash = CryptoJS.SHA1(password);
        $.ajax({
            type: 'POST',
            url: '/cine-mtl/resetPassword',
            data:'email='+email+'&password='+hash,
            success: function () {
            	$('#formReset').hide();
            	$('#notify').show();
            },
            error: function (data) {
                console.log('not logout');
            }
        });
	}else{
		$('[name=password]').val('');
		$('[name=password1]').val('');
		$('[name=password]').parent('div').addClass('has-error');
		$('[name=password1]').parent('div').addClass('has-error');
	}
        return false;
    });
});